﻿@{
    Layout = "_AdminPopupLayout";
}
@model OrderModel

@{
    //page title
    ViewBag.Title = T("Admin.Orders.Fields.PartialRefund").Text;
}
@using (Html.BeginForm())
{
    <div class="content-header clearfix">
        <h1 class="pull-left">
            @T("Admin.Orders.Fields.PartialRefund")
        </h1>
        <div class="pull-right">
            &nbsp;
        </div>
    </div>



    <div asp-validation-summary="All"></div>

    if (ViewBag.RefreshPage == true)
    {
        <script type="text/javascript">
            try {window.opener.document.forms['@(ViewBag.formId)'].@(ViewBag.btnId).click();}
            catch (e){}
            window.close();
        </script>
    }




    @string.Format(T("Admin.Orders.Fields.PartialRefund.OrderInfo").Text, Model.Id)

    <div class="content">
        <div class="form-horizontal">
            <div class="panel-group">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <div class="col-md-3">
                                        <u-label asp-for="AmountToRefund" />
                                    </div>
                                    <div class="col-md-6">
                                        <u-editor asp-for="AmountToRefund" />: &nbsp;&nbsp;&nbsp; <span style="white-space: nowrap">
                                            @string.Format(T("Admin.Orders.Fields.PartialRefund.AmountToRefund.Max").Text, Model.MaxAmountToRefund.ToString("G29"), Model.PrimaryStoreCurrencyCode)
                                    </div>
                                    <div class="col-md-3">
                                        <input type="submit" name="partialrefundorder" value="@T("Admin.Orders.Fields.Refund")" id="partialrefundorder" class="adminButton" />
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    
    

}
